package com.cvit.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cvit.model.Msg;
import com.cvit.model.Nationality;
import com.cvit.service.NationalityService;

@Controller
public class NationalityController {
	@Autowired
	NationalityService nationalityService;
	
	/**
	 * 查询所有民族
	 * */
	@ResponseBody
	@RequestMapping("/nation")
	public Msg getNation(){
		List<Nationality> nation=nationalityService.getAll();
		return Msg.success().add("nation", nation);
	}

}
